Skip to content

fix(ci): License-Secret-Injection — CI seit License-Guard rot#7

Merged
Baldri merged 1 commit into
mainfrom
claude/session/fix/ci-license-secret
Jul 2, 2026
Merged

fix(ci): License-Secret-Injection — CI seit License-Guard rot#7
Baldri merged 1 commit into
mainfrom
claude/session/fix/ci-license-secret

Conversation

@Baldri

@Baldri Baldri commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Was

Inject-Secret-Mechanik von docmind-desktop nach Mingly portiert; CI erzeugt _license-secret.ts jetzt selbst.

Warum

license-activation.ts importiert das gitignorte, generierte _license-secret.ts — aber Mingly hatte (anders als Docmind) kein Generierungs-Script. CI war seit dem License-Guard-Commit auf jedem Lauf rot (TS2307), lokale Builds hingen an einer lose auf Disk liegenden Datei mit Dev-Fallback-Secret — das ist auch im publizierten v0.7.1 drin (siehe Review-Punkte).

Änderungen

  • scripts/inject-secret.ts (Port von docmind, MINGLY_LICENSE_SECRET)
  • prebuild:main-Hook in package.json
  • ci.yml: Inject-Steps in Typecheck-/Test-Jobs, Secret-Env in Build-/Release-Jobs
  • tsx als devDependency
  • Repo-Secret MINGLY_LICENSE_SECRET gesetzt; lokales .env mit Production-Secret, _license-secret.ts regeneriert (IS_PRODUCTION_SECRET=true)

Tests

typecheck grün, Testsuite Exit 0, npm ci --dry-run Exit 0.

Review-Punkte

  • v0.7.1 wurde mit Dev-Fallback-Secret ausgeliefert — Lizenzvalidierung läuft dort im Dev-Modus. Entscheid nötig, ob v0.7.2 nachgeschoben wird (separat gestellt)
  • Der Release-Job in ci.yml publiziert bei künftigen Tag-Pushes UNSIGNIERTE Builds via --publish always — Kollisionsrisiko mit manuell notarisierten Artefakten (separat gestellt)

🤖 Generated with Claude Code

license-activation.ts imports the gitignored generated module
_license-secret.ts, but Mingly had no generation script — CI failed
at typecheck/test on every run since the license guard landed, and
local builds silently depended on a stale hand-placed file.

- scripts/inject-secret.ts: reads MINGLY_LICENSE_SECRET from env/.env,
  falls back to a dev marker (same pattern as docmind-desktop)
- prebuild:main lifecycle hook regenerates it on every build
- ci.yml: explicit inject steps before tsc/vitest (they bypass npm
  lifecycle); build/release jobs get the secret via the prebuild hook
- tsx added as devDependency (deterministic in CI, no on-demand npx)

MINGLY_LICENSE_SECRET is set as repo secret and in local .env.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Baldri Baldri merged commit a1738a9 into main Jul 2, 2026
@Baldri Baldri deleted the claude/session/fix/ci-license-secret branch July 2, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant